import request from '@/util/request.js'

export const tendererResgisterService=(registerDate)=>{
    
    const params=new URLSearchParams()
    for(let key in registerDate){
        params.append(key,registerDate[key]);
    }
   return request.post('/tenderer/register',params);
}
export const tendereLogin=(registerDate)=>{
    
    const params=new URLSearchParams()
    for(let key in registerDate){
        params.append(key,registerDate[key]);
    }
   return request.post('/tenderer/login',params);
}

export const allTenderer=()=>{
    return request.get('tenderer/AllTenderer')
 }

 export const delectTenderer=(id)=>{
    return request.put(`/tenderer/deleteTenderer?id=${id}`)
 }
 export const editTenderer=(tendererData)=>{
    return request.put('/tenderer/edit',tendererData)
 }

 export const getTenderer=(username)=>{
    return request.get(`/tenderer/user?username=${username}`)
}
export const tendererInfo=(name)=>{
    return request.get(`/tenderer/findTendererByName?name=${name}`)
}